@extends('admin.base')

@section('content')
    <div class="layui-card" style="margin-top: 20px; height: 390px;">
        <div class="layui-card-body">
            <div class="layui-form">
                {{csrf_field()}}
                @if(auth('admin')->id() == 1)
                <div class="layui-form-item">
                    <label for="" class="layui-form-label">所属账号</label>
                    <div class="layui-input-inline layui-width-300">
                        <select name="parent_id" id="parent_id">
                            <option value="0">一级主账号</option>
                            @foreach($parentData as $val)
                            <option value="{{$val['id']}}">{{$val['username']}}</option>
                            @endforeach
                        </select>
                    </div>
                </div>
                @endif

                <div class="layui-form-item">
                    <label for="" class="layui-form-label">名称</label>
                    <div class="layui-input-inline">
                        <input type="text" name="username" value=""  lay-verify="required" placeholder="" class="layui-input layui-width-300">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label for="" class="layui-form-label">密码</label>
                    <div class="layui-input-inline">
                        <input type="password" name="password" value="" placeholder="" class="layui-input layui-width-300">
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-input-block">
                        <button type="submit" class="layui-btn layui-btn-sm" lay-submit="" lay-filter="formSubmitData" wy-data="{url:'{{route('admin.administrator.store')}}'}" ><i class="fa fa-save"></i> 保存</button>
                        <a href="javascript:parent.layui.layer.closeAll();" class="layui-btn layui-btn-primary layui-btn-sm"><i class="fa fa-reply-all" aria-hidden="true"></i>  取消</a>
                    </div>
                </div>

            </div>
        </div>
    </div>
@endsection

@section('script')

@endsection
